package com.chenjinyan.back;

import org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.security.auth.message.config.AuthConfigFactory;

//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * @author chenjinyan
 * @version v1.0
 */
@SpringBootApplication
//@EnableEurekaClient
public class LostAndFindBackUserApplication {

    public static void main(String[] args) {
        /**
         * 不加上下面这个if判断的话，在IDE中运行没有问题；但是如果打成jar包，通过bat文件启动，会报一个null异常
         */
        if (AuthConfigFactory.getFactory() == null) {
            AuthConfigFactory.setFactory(new AuthConfigFactoryImpl());
        }
        SpringApplication.run(LostAndFindBackUserApplication.class, args);

    }
}
